package com.mdd.front.service.goods;


import com.mdd.common.core.PageResult;
import com.mdd.common.entity.goods.Goods;
import com.mdd.front.validate.PageParam;
import com.mdd.front.vo.goods.*;

import java.util.List;
import java.util.Map;

/**
 * 服务接口类
 */
public interface IGoodsService {

    /**
     * 服务列表
     *
     * @param pageParam 分页参数
     * @param params    搜索参数
     * @return PageResult<GoodsVo>
     */
    PageResult<GoodsListVo> list(PageParam pageParam, Map<String, String> params);

    /**
     * 服务详情
     *
     * @param id 主键ID
     * @return Goods
     */
    GoodsDetailVo detail(Long id,Long userId, Long cityId);

    StatisticsGoodsVo statistics(Map<String, String> params);

    List<GoodsDetailVo> detailByIds(List<Long> goodsIds);

    OrderGoodsDetailVo reserveGoods(Long id, Long userId, Integer number);

    List<Goods> listByIds(List<Long> goodsIds);

    List<Goods> hotService(int limit);

    Goods getEntityById(Long goodsId);

    OrderGoodsDetailVo detailByUserId(Long userId, Integer goodsNum, Long specificationId, Integer isBuy);

    void updateEntityById(Goods model);

    /**
     * 查询热销排行版
     * @param pageParam 分页对象
     * @return 返回热销排行榜
     */
    PageResult<GoodsListVo> hotList(PageParam pageParam);

    GoodsDetailVo getTodaySpecials();

    /**
     * 限时商品列表
     *
     * @param pageParam 分页参数
     * @param params 搜索参数
     * @return PageResult<LimitedTimeGoodsVo>
     */
    PageResult<LimitedTimeGoodsListVo> listLimited(PageParam pageParam, Map<String, String> params);
}
